home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Can you printf a long
- Date: 4 Apr 1996 17:40:33 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4k1mlh$3lh@solutions.solon.com>
- References: <4ju8o1$dc3@news.netam.net> <4APR199610244914@erich.triumf.ca>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4APR199610244914@erich.triumf.ca>,
- P.Bennett <bennett@erich.triumf.ca> wrote:
- >An int must be _at_ _least_ 2 bytes, but may be longer. A long must be at
- >least as long as an int, but may (or may not) be longer. It seems that on
- >your system, both int and long are 32 bits (4 bytes).
-
- This is not quite correct; an int must be at least 16 bits. This may be
- only one byte; a byte in C is simply equivalent to a char, which must be at
- least 8 bits, but may be larger. It is legit for sizeof(long) to be 1,
- and all types to be 32 bits, or 64 bits, or whatever.
-
- In particular, int may be 1 byte, as long as that byte is at least 16 bits.
-
- >Floats are stored in a quite different format than ints and longs.
-
- This is almost always true. :)
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-